#ifndef _GRAPHICS_ENGINE_H
#define _GRAPHICS_ENGINE_H

#include <QMainWindow>
#include "GlWindow.h"
#include "InfoWindow.h"

class GameEngine;
class Player;
class QAction;
class QLabel;
class QWidget;

class GraphicsEngine : public QMainWindow
{
    Q_OBJECT

    public:
        GraphicsEngine();
        void connecting( GameEngine * );

	protected:
		void closeEvent(QCloseEvent *event);

    private slots:
        void newGame();
        bool saveGame();
        bool loadGame();
        void displayWinner(Player*);
        void displayDeuce();
		void updateSettingRegularMoves();
		void updateSettingLastMove();
		void updateSettingAnimation();
		
    private:
        void createActions();
        void createMenus();
        void createToolBars();
		void createStatusBar();

		QWidget *centralWindow;
        GlWindow *scene;
		InfoWindow *infos;

		QLabel *statusBarLabel;

        QMenu *fileMenu;
        QMenu *viewMenu;
        QMenu *toolsMenu;
        QMenu *helpMenu;

        QToolBar *fileToolBar;

//------- Action du Menu "File" ---------------
        QAction *newAction;
        QAction *saveAction;
        QAction *loadAction;
        QAction *exitAction;

//------- Action du Menu "View" ---------------
		QAction *regularMovesAction;
		QAction *lastMoveAction;
		QAction *animationAction;

//------- Action du Menu "Tools" ---------------
/*        QAction *undoMoveAction;
        QAction *redoMoveAction;
		QAction *breakAction;
		QAction *optionsAction;

//------- Action du Menu "Help" ---------------
        QAction *aboutAction;
        QAction *helpAction;
*/      
        
	signals:
		void startNewGame();

};

#endif
